class Run {
    constructor(props) {
        this.OldVals = "dog";
    }
}

const example = new Run({});
console.log(example);


let templates = { name: "宁姚", sex: "女", age: 12, core: { work: "code" }, extra: "IS OK" };
// app.person = templates;

let attrs = "core.work";
attrs = "core.done";
attrs = "done.work";

const fn2value = new Function('data', 'with (data) { return ' + attrs + '}');

try {
    attrs = fn2value(templates);
} catch (error) {
    console.error("this is wrong props");
}
console.log(attrs);
